Uploaded image for project: 'Fuse Tooling'
  1. Fuse Tooling
  2. FUSETOOLS-1077

camel context won't run without tests in eclipse kepler

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 7.3.0
    • 7.2.0
    • Camel Local Launcher
    • None

      Creating this issue on behalf of github user ronnyaerts:

      (Original issue at: https://github.com/fusesource/fuseide/issues/79)

      I updated my fuseide source files from github (commit of 26/06/2014 16:31:06), builded the complete project and updated the plugins in kepler so I have pom version 7.3.0-SNAPSHOT.

      My camel context run fine when run with tests but fail without tests with following error:
      [INFO] Starting Camel ...
      2014-03-31 15:42:59.853 [INFO ] [org.apache.camel.main.MainSupport] Apache Camel 2.12.3 starting
      2014-03-31 15:42:59.946 [INFO ] [org.springframework.context.support.ClassPathXmlApplicationContext] Refreshing org.springframework.context.support.ClassPathXmlApplicationContext@4c9d7b5: startup date [Mon Mar 31 15:42:59 CEST 2014]; root of context hierarchy
      2014-03-31 15:43:00.017 [INFO ] [org.apache.camel.main.MainSupport] Apache Camel 2.12.3 stopping
      [ERROR] *************************************
      [ERROR] Error occurred while running main from: org.apache.camel.spring.Main
      [ERROR]
      java.lang.reflect.InvocationTargetException
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:606)
      at org.apache.camel.maven.RunMojo$1.run(RunMojo.java:487)
      at java.lang.Thread.run(Thread.java:744)
      Caused by: org.springframework.beans.factory.BeanDefinitionStoreException: Could not resolve bean definition resource pattern [META-INF/spring/.xml]; nested exception is java.io.FileNotFoundException: class path resource [META-INF/spring/] cannot be resolved to URL because it does not exist
      at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:221)
      at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:180)
      at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:243)
      at org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:127)
      at org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:93)
      at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:130)
      at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:537)
      at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:451)
      at org.springframework.context.support.ClassPathXmlApplicationContext.(ClassPathXmlApplicationContext.java:139)
      at org.springframework.context.support.ClassPathXmlApplicationContext.(ClassPathXmlApplicationContext.java:93)
      at org.apache.camel.spring.Main.createDefaultApplicationContext(Main.java:186)
      at org.apache.camel.spring.Main.doStart(Main.java:140)
      at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61)
      at org.apache.camel.main.MainSupport.run(MainSupport.java:148)
      at org.apache.camel.main.MainSupport.run(MainSupport.java:352)
      at org.apache.camel.spring.Main.main(Main.java:73)
      ... 6 more
      Caused by: java.io.FileNotFoundException: class path resource [META-INF/spring/] cannot be resolved to URL because it does not exist
      at org.springframework.core.io.ClassPathResource.getURL(ClassPathResource.java:177)
      at org.springframework.core.io.support.PathMatchingResourcePatternResolver.isJarResource(PathMatchingResourcePatternResolver.java:411)
      at org.springframework.core.io.support.PathMatchingResourcePatternResolver.findPathMatchingResources(PathMatchingResourcePatternResolver.java:340)
      at org.springframework.core.io.support.PathMatchingResourcePatternResolver.getResources(PathMatchingResourcePatternResolver.java:279)
      at org.springframework.context.support.AbstractApplicationContext.getResources(AbstractApplicationContext.java:1269)
      at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:208)
      ... 21 more
      [ERROR] ************************************
      [INFO] ------------------------------------------------------------------------
      [INFO] BUILD FAILURE

      I manually created an empty src/main/resources/META-INF/spring folder but this does not help. The META-INF/spring folder does not seem to be created in my target.

      I have a "war" project and use the java 7 jdk to build.

            lheinema@redhat.com Lars Heinemann
            lheinema@redhat.com Lars Heinemann
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: